Other Protocols
The following protocols are available globally.
-
The
See moreVOActionSheetViewControllerDelegate
protocol is responsible for responding toVOActionSheetItem
selection and dismissing theVOActionSheetViewController
.Declaration
Objective-C
@protocol VOActionSheetViewControllerDelegate <NSObject>
Swift
protocol VOActionSheetViewControllerDelegate : NSObjectProtocol
-
See moreVOCannedSoundManagerProtocol
is the interface responsible for getting prerecorded sounds from the Vouchr server.Declaration
Objective-C
@protocol VOCannedSoundManagerProtocol
Swift
protocol VOCannedSoundManagerProtocol
-
Undocumented
See moreDeclaration
Objective-C
@protocol VODialogViewProtocol - (void)showOnParentViewController:(UIViewController *)parentViewController; - (void)showOnTopVisibleViewController; - (void)setTitle:(nullable NSString *)title; - (void)setBodyText:(nullable NSString *)body; - (void)setPositiveButtonText:(NSString *)buttonText withCompletionHandler:(nullable void (^)(void))completionHandler; - (void)setNegativeButtonText:(NSString *)buttonText withCompletionHandler:(nullable void (^)(void))completionHandler; - (void)setError:(nullable NSError *)error; - (void)setView:(UIView *)view; - (void)dismiss; @end
Swift
protocol VODialogViewProtocol
-
Undocumented
See moreDeclaration
Objective-C
@protocol VODiscoverManagerProtocol <NSObject> - (void)requestVoucherTemplateCategoriesWithSuccess:(void(^)(NSArray <VOVoucherTemplate *> *voucherTemplates))onSuccess failure:(void(^)(NSError *error))onFail; - (void)requestVoucherTemplatesForCategory:(VOVoucherTemplateCategory *)category onSuccess:(void (^)(NSArray<VOVoucherTemplate *> *voucherTemplates))onSuccess failure:(void (^)(NSError *error))onFail; @end
Swift
protocol VODiscoverManagerProtocol
-
The ‘VODiscoverScreenViewControllerDelegate’ is the object responsible for handling callbacks from the
See moreVODiscoverScreenViewController
. Screens include login screen, proceed screen, and customized personalization screens.Declaration
Objective-C
@protocol VODiscoverScreenViewControllerDelegate <NSObject>
Swift
protocol VODiscoverScreenViewControllerDelegate
-
Undocumented
See moreDeclaration
Objective-C
@protocol VODiscoverScreenViewControllerProtocol <NSObject> @property (nonatomic, weak) id<VODiscoverScreenViewControllerDelegate> delegate; + (instancetype)viewControllerWithDiscoverManager:(VODiscoverManager *)discoverManager creationManager:(VOVoucherCreationManager *)createManager creationFlowCoordinator:(VOVoucherCreationFlowCoordinator *)creationFlowCoordinator vouchrTheme:(VOTheme *)vouchrTheme builder:(void (^)(VODiscoverScreenBuilder *builder))builderBlock; @end
Swift
protocol VODiscoverScreenViewControllerProtocol
-
The
See moreVOFullScreenImageEditViewControllerDelegate
is the object responsible for supplying additional photo editing screens.Declaration
Objective-C
@protocol VOFullScreenImageEditViewControllerDelegate <NSObject>
Swift
protocol VOFullScreenImageEditViewControllerDelegate : NSObjectProtocol
-
See moreVOGameViewControllerDelegate
is used to notify the delegate of any changes a game view controller makes to theVOGameData
.Declaration
Objective-C
@protocol VOGameViewControllerDelegate <NSObject>
Swift
protocol VOGameViewControllerDelegate : NSObjectProtocol
-
See moreGameViewControllerProtocol
is the interface for UIViewControllers that facilitate interactions with games. UIViewControllers must implement this protocol to appear in the game selection screen.Declaration
Objective-C
@protocol VOGameViewControllerProtocol <NSObject>
Swift
protocol VOGameViewControllerProtocol : NSObjectProtocol
-
Undocumented
See moreDeclaration
Objective-C
@protocol VOGiftPackageFactory <NSObject> - (void)setState:(VOGiftPackageState)state animated:(BOOL)animated completion:(nullable void(^)(void))completion; - (UIView *)getBackView; - (UIView *)getFrontView; @optional - (CGRect)contentsRect; - (void)setWrappingData:(VOWrappingData *)wrappingData; - (void)setLockImageURL:(NSURL *)url; - (void)revealComplete; @end
Swift
protocol VOGiftPackageFactory : NSObjectProtocol
-
The
VOLoadingViewProtocol
is responsible for animating any custom loading view. It is used for fullscreen loading views.Note
VOUser is responsible for adding the loading view as a subview and constraining it to the view it should appear on.Declaration
Objective-C
@protocol VOLoadingViewProtocol
Swift
protocol VOLoadingViewProtocol
-
See moreVOMediaUploadManagerProtocol
is the interface for uploadingVOVoucherMedia
. Uploading events will be triggered to a manager implementing this interface.Declaration
Objective-C
@protocol VOMediaUploadManagerProtocol
Swift
protocol VOMediaUploadManagerProtocol
-
See moreVOPersonalizationOptionViewControllerDelegate
is the delegate used for passing information between all of the default personalization option view controllers and the voucher creation view controller. If an extra personalization option view controller is created, it should call these delegate methods where appropriate.Declaration
Objective-C
@protocol VOPersonalizationOptionViewControllerDelegate <NSObject>
Swift
protocol VOPersonalizationOptionViewControllerDelegate
-
See moreVOPersonalizationOptionViewControllerProtocol
is the interface for all of the default personalization option view controllers.Declaration
Objective-C
@protocol VOPersonalizationOptionViewControllerProtocol <NSObject>
Swift
protocol VOPersonalizationOptionViewControllerProtocol
-
See moreVOPreviewVoucherContentsViewControllerDelegate
is the delegate used for passing information between the edit view controller and the voucher creation view controller. If a different edit view controller than the defaultVOPreviewVoucherContentsViewController
, implement this delegate inside the overridden view controller.Declaration
Objective-C
@protocol VOPreviewVoucherContentsViewControllerDelegate <NSObject>
Swift
protocol VOPreviewVoucherContentsViewControllerDelegate : NSObjectProtocol
-
See moreVOPreviewVoucherContentsViewControllerProtocol
is the interface for theVOPreviewVoucherContentsViewController
. If a different edit view controller is used, it needs to implement this protocol.Declaration
Objective-C
@protocol VOPreviewVoucherContentsViewControllerProtocol
Swift
protocol VOPreviewVoucherContentsViewControllerProtocol
-
Undocumented
See moreDeclaration
Objective-C
@protocol VOProductDetailsViewControllerDelegate <NSObject> @optional - (void)onCancelProductDetails; - (void)onProductDetailConfirmedWithPersonalizedObject:(NSDictionary *)personalization; @end
Swift
protocol VOProductDetailsViewControllerDelegate : NSObjectProtocol
-
See moreVORevealPersonalizationViewControllerProtocol
is the interface for any view controllers that are presented from theVOVoucherRevealViewController
when gift elements are tapped by the user in the reveal view controller.Declaration
Objective-C
@protocol VORevealPersonalizationViewControllerProtocol <NSObject>
Swift
protocol VORevealPersonalizationViewControllerProtocol
-
General search protocol for asynchronous string-based searches.
See moreDeclaration
Objective-C
@protocol VOSearchAgent <NSObject>
Swift
protocol VOSearchAgent : NSObjectProtocol
-
Undocumented
See moreDeclaration
Objective-C
@protocol VOSoundSelectionDelegate <NSObject> - (void)didSelectSoundWithSoundMedia:(VOSoundMedia *)soundMedia; - (void)didCancelSelectSound; @end
Swift
protocol VOSoundSelectionDelegate : NSObjectProtocol
-
Undocumented
See moreDeclaration
Objective-C
@protocol VOUIDelegate <NSObject> @optional /** This delegate method is called when attempting to initialize its gift package. If it is not implemented, the default envelope will be used. Only implement this method if you want to use a custom gift package. This method is used to setup and configure your custom gift package. */ - (id<VOGiftPackageFactory>)customGiftPackageFactory; @end
Swift
protocol VOUIDelegate : NSObjectProtocol
-
See moreVOVoucherCreationFlowDelegate
s are responsible for supplying additional information needed for subsequent screens as well as handlingVOVoucher
related request callbacks.Declaration
Objective-C
@protocol VOVoucherCreationFlowDelegate <NSObject, VOVoucherGameDelegate>
Swift
protocol VOVoucherCreationFlowDelegate : VOVoucherGameDelegate
-
The voucher creation view controller is the screen responsible for presenting all personalization options and provides visual feedback for alterations to the
See moreVOVoucher
.Declaration
Objective-C
@protocol VOVoucherCreationViewControllerProtocol <NSObject>
Swift
protocol VOVoucherCreationViewControllerProtocol : NSObjectProtocol
-
Undocumented
See moreDeclaration
Objective-C
@protocol VOVoucherRevealFlowDelegate <NSObject> @optional /** Called when a user taps on an element that represents a `VOVoucherMedia` to allow a custom view controller to be shown in place of the default. If not implemented or nil is returned, the default reveal personalization view controller will be used. Defaults: VOVoucherMediaTypeNote - `VOAddNoteViewController` VOVoucherMediaTypeImage, VoucherMediaTypeAnimated - `VOSingleGalleryViewController` VOVoucherMediaTypeYoutube - `VOYouTubePlayerViewController` VOVoucherMediaTypeVideo - `VOFullScreenVideoPlayerViewController` @param voucherMedia - The media object that was tapped on. @return a view controller that shows the `VOVoucherMedia` in more detail, nil if the default view controller should be used. */ - (UIViewController <VORevealPersonalizationViewControllerProtocol> *)voucherRevealPersonalizationviewControllerForVoucherMedia:(VOVoucherMedia *)voucherMedia; /** Called when a user taps on an element that represents a reveal cell that is not a media item, to allow a custom view controller to be shown in place of the default. If not implemented or nil is returned, the default reveal personalization view controller will be used. @param voucher - The voucher object. @return a view controller that shows the `VORevealCellProtocol` in more detail, nil if the default view controller should be used. */ - (UIViewController <VORevealPersonalizationViewControllerProtocol> *)voucherRevealPersonalizationViewControllerForGiftWithVoucher:(VOVoucher *)voucher; /** Used to retrieve the destInfo for the current voucher @param voucher - The voucher object @return a dictionary containing the above values with names identical to the method parameter names */ - (NSDictionary *)claimDestInfoForVoucher:(VOVoucher *)voucher; @end
Swift
protocol VOVoucherRevealFlowDelegate : NSObjectProtocol
-
See moreVOVoucherRevealViewControllerDelegate
is the delegate used to supply additional information needed on theVOVoucherRevealViewController
.Declaration
Objective-C
@protocol VOVoucherRevealViewControllerDelegate <NSObject>
Swift
protocol VOVoucherRevealViewControllerDelegate : NSObjectProtocol